package com.ruoyi.teaching.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.teaching.domain.TeachingCourseFolder;
import com.ruoyi.common.core.domain.Ztree;

/**
 * 课程目录Service接口
 *
 * @author William
 * @date 2022-10-11
 */
public interface ITeachingCourseFolderService {
    /**
     * 查询课程目录
     *
     * @param folderId 课程目录主键
     * @return 课程目录
     */
    public TeachingCourseFolder selectTeachingCourseFolderByFolderId(Long folderId);

    /**
     * 查询课程目录列表
     *
     * @param teachingCourseFolder 课程目录
     * @return 课程目录集合
     */
    public List<TeachingCourseFolder> selectTeachingCourseFolderList(TeachingCourseFolder teachingCourseFolder);

    /**
     * 新增课程目录
     *
     * @param teachingCourseFolder 课程目录
     * @return 结果
     */
    public int insertTeachingCourseFolder(TeachingCourseFolder teachingCourseFolder);

    /**
     * 修改课程目录
     *
     * @param teachingCourseFolder 课程目录
     * @return 结果
     */
    public int updateTeachingCourseFolder(TeachingCourseFolder teachingCourseFolder);

    /**
     * 批量删除课程目录
     *
     * @param folderIds 需要删除的课程目录主键集合
     * @return 结果
     */
    public int deleteTeachingCourseFolderByFolderIds(String folderIds);

    /**
     * 删除课程目录信息
     *
     * @param folderId 课程目录主键
     * @return 结果
     */
    public int deleteTeachingCourseFolderByFolderId(Long folderId);

    /**
     * 查询课程目录树列表
     *
     * @return 所有课程目录信息
     */
    public List<Ztree> selectTeachingCourseFolderTree(TeachingCourseFolder folder);


    /**
     * 获取所需章节总数
     *
     * @param courseId
     * @param needSectionCount
     * @return
     */
    public String getNeedSections(Long courseId, int needSectionCount);

    /**
     * 获取最新章节ID
     * @param courseId
     * @param needFolderIndex
     * @return
     */
    public Long getCurrentFolderId(Long courseId, int needFolderIndex);
}
